package com.lottery.im.api.result.entity.bank;

import android.databinding.BindingAdapter;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.lottery.im.R;
import java.io.Serializable;

/**
 * 作者：cyy
 * 时间：2018/9/27。
 */
public class UserBankList implements Serializable {

  /**
   * bankName : 中国银行
   * bank : BOC
   * bankId : 10
   * bankAccount : 3508624861486368514
   */

  private String bankName;
  private String bank;
  private int bankId;
  private String bankAccount;

  @BindingAdapter({"userBankImageUrl"})
  public static void loadUserBankImage(ImageView imageView,String imageName){
    Glide.with(imageView.getContext())
        .load("file:///android_asset/bank/"+imageName.toLowerCase()+".png")
        .apply(new RequestOptions()
            .placeholder(R.drawable.zw)
            .error(R.drawable.zw)
            .fitCenter())
        .into(imageView);
  }

  public String getBankName() {
    return bankName;
  }

  public void setBankName(String bankName) {
    this.bankName = bankName;
  }

  public String getBank() {
    return bank;
  }

  public void setBank(String bank) {
    this.bank = bank;
  }

  public int getBankId() {
    return bankId;
  }

  public void setBankId(int bankId) {
    this.bankId = bankId;
  }

  public String getBankAccount() {
    return bankAccount;
  }

  public void setBankAccount(String bankAccount) {
    this.bankAccount = bankAccount;
  }
}
